{extend name="base/common"}

{block name="style"}
<link href="/static/summernote/summernote.css" rel="stylesheet">
<link href="/static/bootstrap-fileinput/css/fileinput.min.css" rel="stylesheet">

<style>

    .mail-box .mail-subject{
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 124px !important;
        min-width: 124px;
    }


    @media only screen and (max-width: 550px){
        .mail-date{
            display: none;
        }
    }


</style>
{/block}

{block name="page-header"}

{/block}

{block name="main"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="mail-box-header">
            {notempty name="$activity_id"}
            <form method="get" action="" class="pull-right mail-search">
                <div class="input-group">
                    <input type="hidden" value="{$activity_id}" name ='id' >
                    <input type="text" class="form-control input-sm" name="search" placeholder="用户名称" value="{$search}">
                    <div class="input-group-btn">
                        <button type="submit" class="btn btn-sm btn-primary">搜索</button>
                    </div>

                </div>
            </form>{/notempty}
            <h2>报名情况查看</h2>
            <div class="mail-tools tooltip-demo m-t-md">
                <input class="i-checks check-all" type="checkbox">
                <button class="btn btn-white btn-sm m-l ajax-post" url="{:Url('delSign')}" data-original-title="移动到回收站"
                        data-toggle="tooltip" data-placement="top" target-form="id"><i class="fa fa-trash-o"></i>
                </button>
                <!--<button class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="top"><i class="fa fa-eye" style="margin-left: 3px"></i> </button>-->
            </div>
        </div>

        <div class="mail-box">
            <table class="table table-hover table-mail">
                <thead>
                <tr>
                    <th></th>
                    <th>id</th>
                    <th>报名时间</th>
                    <th>报名方式 </th>
                    <th>昵称</th>
                    <th>订单联系人</th>
                    <th>联系方式</th>
                    <th>备注</th>
                    <th>状态 </th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="list" id="vo"}
                <tr>
                    <td> <input type="checkbox" class="i-checks id" name="id[]" value="{$vo.id}"></td>
                    <td>{$vo.id}</td>
                    <td>{$vo.create_time|time_format='Y-m-d H:i'}</td>
                    <td>{$vo.type_id_text}</td>
                    <td>{$vo->user->nickname}</td>
                    <td>{$vo.name}</td>
                    <td>{$vo.mobile}</td>
                    <td>{$vo.remark}</td>
                    <td>{$vo.status_text}</td>
                    <td>
                        <a data-toggle="modal" href="#company-code" onclick="remark(this)" class="btn-sm btn-success"
                           data-remark="{$vo.remark}"
                           style="color: #fff;">查看备注</a>
                        <a  class="btn-sm btn-primary" href="{:Url('Activity/recordinfo2?id='.$vo['id'])}">查看出行人员</a>

                        <a href="{:Url('Activity/delSign?id='.$vo['id'])}" class="confirm ajax-del btn-sm btn-danger">删除</a>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            <div class="btn-group pull-right">{$list->render()}</div>
        </div>
    </div>
</div>
<div id="company-code" class="modal fade" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <form class="form-horizontal" method="post" action="updateCompanyCode">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span
                            aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h3 class="modal-title text-center">查看备注</h3>
                </div>
                <div class="modal-body">
                    <div class="form-group"><label class="col-sm-3 control-label">备注:</label>
                        <div class="col-sm-9">
                            <input type="text"  readonly   class="form-control" required="" name="remark">
                        </div>
                    </div>
                </div>

                <div class="modal-footer">

                </div>

            </form>
        </div>
    </div>
</div>

{/block}

{block name="script"}
<script src="/admin/js/plugins/iCheck/icheck.min.js"></script>
<script src="/static/summernote/summernote.min.js"></script>
<script src="/static/summernote/lang/summernote-zh-CN.js"></script>
<script src="/static/bootstrap-fileinput/js/fileinput.min.js"></script>
<script src="/static/bootstrap-fileinput/themes/fa/fa.js"></script>
<script src="/static/bootstrap-fileinput/js/locales/zh.js"></script>

<script>
    $(document).ready(function(){
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
        $(".check-all").on("ifChanged",function(){
            $("tbody").find(".id").iCheck("toggle");
        });
    });
    function remark(a) {
        $("input[name='remark']").val($(a).attr('data-remark'));
    }
    $('.summernote').summernote({
        lang: 'zh-CN',
        height: 300,
        minHeight: 210,
        callbacks: {
            onImageUpload: function (files) { //the onImageUpload API
                img = sendFile(files[0]);
            }
        }
    });
    highlight_subnav("{:Url('Activity/index')}");




</script>
{/block}